well, analyzing the logic, yes, when reach 12, the counter assumes always 12. but, you could do as follows
if (counter < 12)
counter <= counter + 1;
unless you need to update the counter, you don´t need to keep in 12... this code above must work also. I´m not considering the fact that you are using Else, in other words, you are discarding all other solution, including negative numbers, tri-state and don´t care. good luck!!
Both of those examples will stop at 12 when counting from a lower number, however both behave differently if 'counter' is initialized to a higher value such as 14.
If your application needs to support those higher counter values, a simple change will stop it at 12 irregardless of initial value: if (counter != 12)
counter <= counter + 1;
Or if you like one-liners: counter <= counter + (counter != 12);