Okay, turns out I was overlooking the most obvious mistake
Whenever I tried to give the count a name I gave it the name Count, which is obviously a key word and therefure not usable
SELECT Name, count(*) AS Count ...
This throws an error
If however I write
SELECT Name, count(*) AS Number ...
it does it correctly and no error is thrown.
So simple mistake on my side, using keywords where they shouldn't be written