Added expand option
Better impl of count
Better usage text