moved implementation to count number of features to seperated classes