Measuring nationalism