Every cover letter for a mathematics faculty application I have seen is only one page long (I've seen about 20 of those). On the other hand, most books or websites about the academic job cover letter say that this letter should be two pages long. I would like to hear what other mathematicians (especially if they have served in search committees) say about this. Thank you.
My (limited) understanding is that longer cover letters are more common in the humanities and social sciences.
I've been on multiple hiring committees for tenure-track assistant professors at a mid-tier research institution. We didn't expect two-page cover letters, and for the most part cover letters were quite brief and pro forma. I don't remember seeing two full pages even once, and I don't remember any of the candidates we interviewed saying anything noteworthy on their cover letters. This was expected and fine with everyone on the committee.
There are some situations that might call for a longer cover letter (or at least for you to pay extra attention to this). In particular, I would recommend this when applying to liberal arts teaching-oriented positions. From what I have overheard, my understanding is that, on average, teaching-oriented math departments care about "fit" more than research-oriented departments do. (And moreover, when research-oriented departments do care a lot about fit, they don't seem to expect candidates to anticipate what the department is looking for.)
You might also write a longer cover letter if you can genuinely make the case that you are a good fit for a particular department. Don't BS, but offer good reasons if you have them.
A longer cover letter might be a good idea if your application is in any way unusual. If you are finishing up a postdoc, it is understood that you will be applying to a huge number of jobs, and a brief cover letter is usually fine. If you already have a tenure-track position and are applying elsewhere, or would prefer to work at a teaching-focused institution despite having a research-heavy CV, etc., then you might consider explaining yourself more fully.
Good luck on your job search!