There is no magic number for how many links to add to a guest post in order to get backlinks for your content. The number will vary depending on the quality of the guest post, its length, the target keywords used, and your content.
“Content as a way to build links (68%). The next two most popular techniques were competitor analysis (54%) and guest posting (47%)” - Aira’s State of Link Building Report 2022
The more quality both your guest post and your content have, the more likely it is that both will be shared and linked to, naturally.
However, as per my research across the web from a few trusted sources, adding no more than 3 to 4 links to a guest post would be adequate [to start with] to avoid appearing spammy to readers and to respect the guest posting platform.
P.S:
You are currently on the Digital Marketing Forum page; for more information on a variety of topics that may be helpful to you, please visit Blog Posts (button below) and also share any content post you love with your network.
[If you have any specific questions in mind, please drop a mail and I will answer through a post at the earliest possible time]. Check this forum frequently for fresh posts.
In the interest of the readers, irrelevant and spammy comments and links are deleted.