This is possible... Here are my thoughts / tips for getting started:
1. Once you decide which language you wish to use, leverage one of the
existing libraries found here --
http://developer.foursquare.com/docs/overview.html.
2. You will need a key and secret to work with the API. Visit
http://foursquare.com/oauth to register your app to retrieve them.
3. Your requirements don't call for user authentication so it'll be a
little easier to build. It will mainly rely on venues/search (read
more about it here:
http://developer.foursquare.com/docs/venues/search.htm).
You will need to do a venue search for your given lat and long,
passing along with it your client_id, client_secret, and limit. The
default limit is 10, the max limit is set at 50. If you want to
retrieve more you would have to do some work on the client side to
adjust the lat/long to retrieve more results.
4. It appears the data element you want is "hereNow". This will only
display users who are actually at the venue at that time and the users
will disappear after three hours. If you want to get the number of
users for a 10 hour window, you will need poll on your end.
Alternatively, have you considered using "usersCount" instead? It
displays the number of users who have checked in at a venue for that
venue's entire history.
You can see the data I'm referring to by checking out the venues/
search data explorer --
http://developer.foursquare.com/docs/explore.html#req=venues/search%3Fll%3D40.7,-74%26limit%3D50
happy developing!
-matt