I'm working in bioinformatics, but my computational skills far outstrip my knowledge of biology or genomics. So forgive the noobish question.
According to the VCF specification, the INFO column for each coordinate [CHROM, POS] can contain values for
AC : allele count in genotypes, for each ALT allele, in the same order as listed
AF : allele frequency for each ALT allele in the same order as listed: use this when estimated from primary data, not called genotypes
AN : total number of alleles in called genotypes
For example, I'm working with the the VCF file you can download from Kaviar.
I think I understand how to calculate those numbers from raw sequences from a pileup. If for a given coordinate [CHROM, POS], $N_0$ is the number of hits for the reference allele, $\textrm{AC}_i \equiv N_i$ is the number of hits for the $i^{th}$ variant (maybe only one), and AN is the total number of alleles counted: $\textrm{AN} \equiv \sum_0^n N_i$, then the allele frequency for the $i^{th}$ variant is
$$\textrm{AF}_i = \frac{\textrm{AC}_i}{\textrm{AN}} = \frac{N_i}{\sum_0^n N_i}$$
So the phrase "total number of alleles in the dataset" would mean "total number of hits to coordinate [CHROM, POS] for any allele. And by "hit" I mean an aligned sequence fragment that includes that coordinate.
But I may not be taking into account the caveat for AF: "use this when estimated from primary data, not called genotypes."
Am I correctly understanding AF, AC, and AN in VCF files?