To calculate the materials, you can use the delimitation made with the stakes as a reference. What is necessary is to measure the distance between each of them. Don’t forget to consider the doors.
You can draw an outline of the area you want to fence and mark the posts.
To give you a better idea of how many posts you need, you can follow a general rule: fence posts must be 8 feet away or less, this way you will prevent the fence from sinking.