The sample size is the number of independent observations made on the population. Just as it would be invalid to generalize about all people from a given country based on conversations with two of its citizens, it would also be invalid to generalize, for example, about a community of insects inhabiting a grassland based on observations from two sweeps of an insect collection net. In general, we will want as large of a sample as possible. This will improve our confidence that the estimate we generate from the sample is close to the actual parameter we are interested in knowing.
In addition to making sure the sample size is sufficiently large, we need to think about whether our sampling techniques might be biased in any way. Most sampling methods will be inherently biased, e.g. pitfall traps for sampling arthropods will not provide a very accurate view of the entire arthropod community present because they will capture highly active, walking arthropods much more often than more sedentary arthropods or arthropods that move primarily by flying. But this is not a problem as long as the bias is recognized and acknowledged when the results of a research study are analyzed.