Class and source-file count

Also known as: types · type count · source-file count

What it is

AtlasArc counts the implementation units supplied by the active analysis: declared classes, interfaces, enums, annotations, and records for Java/Kotlin, and represented source files for TypeScript. This measures code mass inside an architecture unit, not the number of packages or source folders in a subtree. A boundary with one implementation unit and one with fifty are very different things to read, reason about, and refactor, even when other metrics look similar.

Why it matters

Implementation-unit count is a fast orientation signal for cognitive and refactoring load. Boundaries that grow without deliberate decomposition tend to accumulate responsibilities alongside their types or files. When you are trying to extract a module, move a service, or understand an unfamiliar codebase, the count helps distinguish a small seam from an area that needs a broader plan.

What a high value usually means

A high count means the package or source folder contains many implementation units. That may be appropriate for a domain model, a comprehensive library, or generated code. It may also mean the boundary was never decomposed and is holding multiple responsibilities by accident. Compare with fan-in: a large boundary with high fan-in is a shared foundation many others depend on; a large boundary with low fan-in may have grown without a clear design reason.

What a low value usually means

A low count means the boundary contains only a few types or files and may have a clear, narrow purpose. That is often the right shape. A low count alongside high complexity or coupling is still worth inspecting: the implementation units are few, but individually complicated or structurally overloaded.

When not to overinterpret it

This is a size metric, not a quality metric, and a class is not interchangeable with a source file. Use the native unit for the active analysis to compare boundaries within that model. A focused package with thirty types may be healthier than one class with three hundred methods; use the count to orient yourself, not to grade quality directly.

Where AtlasArc shows it

As a size option in Composition, Hotspots, and Subsystems; as a compatible heatmap metric in structural lenses; and in the Metrics sidebar for the selected architecture unit. AtlasArc uses the class or source-file form that belongs to the active analysis.

How AtlasArc computes it

JVM unit count is the number of declared types represented by the current Java/Kotlin analysis. TypeScript unit count is the number of source files represented by the current artifact analysis.