add implementation for feature count and probability