Create count_ways

added working code