As にち, 日 doesn't seem to be a counter (which is always preceded with dash in dictionaries). Does this mean that 日 means Sunday when used with days of the month? If so, how does it make sense?

EDIT:

Is 日 a counter in 十三日 or is it not?