For the switch, use eq instead of ==. == operator is for comparing numbers, and eq is for comparing strings. Also better use a hash, instead of this switch, that makes your code more neat. Key for the hash would be 'Jan' etc, and value would be 0 etc.
For question 3, instead of array, use hash. The key for the hash is referer, and value is the counter.