Connected and Automated Vehicles (CAVs) utilize a variety of onboard sensors to sense their surrounding environment. CAVs can improve their perception capabilities if vehicles exchange information about what they sense using V2X communications. This is known as cooperative or collective perception (or sensing). A frequent transmission of collective perception messages could improve the perception capabilities of CAVs. However, this improvement can be compromised if vehicles generate too many messages and saturate the communications channel. An important aspect is then when vehicles should generate the perception messages. ETSI has proposed the first set of message generation rules for collective perception. These rules define when vehicles should generate collective perception messages and what should be their content. We show that the current rules generate a high number of collective perception messages with information about a small number of detected objects. This results in an inefficient use of the communication channel that reduces the effectiveness of collective perception. We address this challenge and propose an improved algorithm that modifies the generation of collective perception messages. We demonstrate that the proposed solution improves the reliability of V2X communication and the perception of CAVs.