A Scala library demonstrating methods to count elements in a stream