The pitch of the gear is being referred to in both examples. The pitch is the diameter of the pitch circle (there the teeth engage, somewhere down the flank of each tooth) divided by the number of teeth. There are two measurement systems, metric and imperial.
In the imperial system, the number if teeth is divided by the diameter in inches and the result expressed in whole numbers as DP (diametral pitch). If you have 64 teeth on a one-inch pitch circle, the DP is 64, or 64 teeth per inch.
In the metric system, the pitch diameter is divided by the number of teeth (reverse of the imperail system) and the result expressed as the distance (in mm) between the centreline of each tooth. Thus a 25mm pitch diameter having 50 teeth on it would have a 0.5mm distance between the centreline of each tooth. This is expressed as 0.5 module, or 0.5mm between each tooth.
You cannot mix gears designed and made to the two different systems. Tamiya use 0.6 module, all 12th cars use 64Dp and most 10th off-road cars use 48DP. Gas cars use a coarser pitch as they need more tooth strength, and the larger the pitch, the stronger the gear tooth. HTH