It is impossible to count all the plants in a habitat, so a sample is taken. A technique that is often used to sample plants is a quadrat. It marks off an exact area so that the plants in that area can be identified and counted. The number of plants counted in a sample of areas can be multiplied up to give an estimate of how many of that plant type are in the whole habitat.
It is impossible to find and count all the animals in an area. You can get an idea of the variety and number by taking a sample. Pitfall traps are often used to sample the small invertebrates living on the ground. You are likely to trap beetles and other insects, as well as spiders and slugs.
Setting up pitfall traps: