The most direct way to collect quantitative data is by measuring things. This can range from physical characteristics in science experiments such as mass, temperature, time or with the aid of equipment, frequencies in all sorts of spectrometers or the number of events triggering a detector or transducer.
However, other disciplines use direct measurement too. Analysis of documents can include direct measurement of word frequencies, sentence and paragraph length. However, it is important to distinguish between direct measurement of temperature and measurement of numbers used as a proxy or indicator. For example, there are measures of readability of documents that relate readability to the average length of sentences and paragraphs. In this case, we measure one thing and we postulate that it is linked to another thing, which is what we seek to measure. This is important because in a PhD, you should always make your assumptions and evidence for those assumptions transparent. All numerical data has a degree of accuracy or uncertainty associated with it. In some cases, this will be small enough to be effectively ignored; in others, we need to quote the uncertainty associated with our data.
Other ways to generate quantitative data include surveys. These may generate numerical data through a variety of closed questions. These may ask a direct question with a binary response, or gather shades of opinion. A common approach is to use a Likert scale, in which we ask our respondents to tell us whether they agree or disagree with a statement and how strongly they agree or disagree. Again, this is not direct measurement, and by the wording of the question, we can introduce bias into our responses.