how do I display samples instead of time

After I import an audio file into Audacity it displays time or length of track above the waveform. How do I make it display the number of samples instead? I need to do this specifically for wav files. Thank you.

The “Timeline” above the tracks panel always shows “time” in hh:mm:ss".
The Selection toolbar may be configured to show time is a selection of units, including samples - click on the little black arrow next to one of the time boxes to select the units that you require.

So it won’t be possible to display in terms of samples? I just feel it would be easier for me to view it if I could display it in terms of samples. Is it possible to display a fine grid so that I can compare more easily between two audio tracks that I import in the same project?

What exactly do you want to compare? The duration of tracks?

I have a pure speech sample and the same sample mixed with various standard noise files
I need to see what kind on change a particular type of noise has on the speech waveform
If I could have a fine grid over the waveform display then it would e easier for me to measure and get an estimate of how much the amplitude of speech is changing due to particular type of noise
And in the code I am working with in Matlab, I do everything in terms if samples, but Audacity displays it in terms of time duration
If I could display it in term of samples in Audacity as well it would be easier for me to compare between my Matlab code result and the Audacity result

You can zoom-in until you see individual samples (the dots) …
duration in samples, (screengrab in zip file).zip (17.9 KB)

The Selection Toolbar can display the cursor position in samples, also the start and end or start and duration of a selection.
I think the way to go with Audacity is to make use of “selection” and cursor position so that you can read the sample numbers from the Selection toolbar.
Audacity’s zoom features allow you to zoom in to sample level:

See here for more information about selections: