Implement count class method in the FMXModel class.