Drupal Association members fund grants that make connections all over the world.
I found out that comments header of the $flag->get_user_count() function could be really misguiding. It says that the function returns the number of items. But actually it doesn't return any numbers, it returns executed db_select() object instead.
I suppose it could be appropriate to add fetchField() call to the function so users won't have to go through the code and will got a number in return as they probably expect to.