I would argue that it is a useful indicator but that we cannot determine how competitive a nation is just by looking at the number of patents that it registers.
First, not all patents have the same value. There are those, for example, who argue that many patents registered by Chinese firms are for innovations that are not useful in any real way.
Second, there can be a great deal of innovation that makes a firm more competitive without being patentable. Many innovations in production and in management are very important to the overall competitiveness of a firm but cannot be patented.
All of that said, there is value in looking at patents. This is because patents generally show that firms and individuals are innovating in a given country, which will often make that country more competitive.