connections limit

How can I limit p2p connections in version 2.9?

Using mangle rules to mark p2p traffic, and limit with queues help.