Control codes are included in the message length.
The 'standard' is 512 bytes per message (including the ending cr and/or lf), but this could be easily increased by the irc server. This includes the additional parameters in your message ('PRIVMSG <target> :' rest-of-line), and if distributed across the network your nick prefix (':<yournick>' rest-of-line). Some servers use techniques such as tokenisation and nickids to reduce the size of the message across the network.
Some servers may also enforce additional limits on certain messages.
Hope that helps