Mathematical and Chemical Analysis of Wiener's Polarity Number