Implemented a foam count