.Count() not working on media

I’m trying to get a count of media files in a folder but .Count() isn’t working.

var mediaFolder = Umbraco.TypedMedia(fontFolderId);
int mediaCount = mediaFolder.Children.Count();

The error I get is “‘object’ does not contain a definition for ‘Count’”
The foreach loop works fine when I get each item in the folder but the .Count f**ks everything up.

Can someone point out to me what I’m doing wrong?


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/75795-count-not-working-on-media