You are asking how functional languages handles shared mutable state. Functional languages do prefer and encourage immutable data structures, but they all (AFAIK) have provisions for mutable shared state. There is a variety of approaches, just as for imperative and OO languages, but in the case of an inventory the state would typically be a database, which would handle concurrency and locking.
A FP language running on the JVM (e.g. Clojure) can use AtomicInteger just like Java can.
For pure functional languages it is a bit more tricky since a pure language in principle does not allow any kind of mutable state. In Haskell this just means operations on shared mutable state happens in the IO monad, indicating that such operations are not pure.
In short, there is nothing magic about FP, and there is no free lunch: You cannot have purity and shared mutable state at the same time.