US consumer confidence has increased more than expected amid weak US stock indexes and rising US-China trade tensions.