Folder Counts

approvedunreviewed

by siulved54

Show how many notes or files each folder holds in the file explorer, with a vault total, file type filters and folder exclusions.

↓ 370 downloadsUpdated 14d agoMIT

Folder Counts

See how many notes each folder holds, right in the file explorer.

The file explorer with a number beside each folder: Journal 353, Projects 91 (Archive 64, Garden 7, Website 19), Reading 32, Templates 5, Attachments 0

The numbers update by themselves as you create, delete, move and rename files. Hover a number to see what is behind it, for example "91 notes in total · 1 directly inside · 3 subfolders".

Works on desktop and mobile.

Settings

Counting

SettingDefaultWhat it does
What to countNotesNotes (Markdown files), all files, only the file types you list, the total words of your notes, or the total size of your files.
ExtensionsmdWith "Files with these extensions": the types to count, such as md, canvas, pdf.
Count everything except theseoffTurns the extension list into a list of types to skip.
Include subfoldersonCount everything below a folder, or only the files directly inside it.
Excluded foldersnoneOne folder per line. Excluded folders get no number and add nothing to their parents. Wildcards work: Archive/**, **/attachments.

Display

SettingDefaultWhat it does
Show counts on expanded foldersoffAn open folder with subfolders hides its number, since its contents are on screen. Turn on to always show it.
Hide zero countsoffLeave empty folders blank.
Compact numbersoff1.2k instead of 1234. Applies to counts and words; sizes are always short (12 KB, 3.4 MB).
Vault total in the status baroffWhat the whole vault holds, following what you count: notes, files, words or size.

Right-click a folder and choose Exclude from folder counts to add it to the excluded list, or Count this folder again to take it off.

Words and sizes

Choose Words in notes under "What to count" and each folder shows the total words of the notes inside it, the way writers track a project. Choose Size of files to see how much space a folder takes, as 12 KB or 3.4 MB. Hover a number for the breakdown, for example "12400 words in total · 18 notes · 96 KB · 2 subfolders".

How words are counted: front matter, fenced code blocks and %%comments%% are skipped; a link like [[Note|shown text]] counts the text you see; embeds and image links count nothing; each Chinese, Japanese kana or Kanji character counts as one word.

Words are read from your notes in the background, a few at a time, so a big vault never stalls Obsidian. Numbers still being counted are shown in italics and fill in as the reading goes. Each note is read once and remembered until it changes. Editing a note updates its folder a moment after you pause. Size mode needs no reading at all.

Commands

CommandWhat it does
Show or hide the countsTurns the numbers off and on for this session.
Recount all foldersCounts again from scratch. You should never need it.

Coming from File Explorer Note Count

This plugin does what File Explorer Note Count does and adds excluded folders, direct-only counts, hiding zeros, compact numbers, a vault total in the status bar and the tooltip. On first run it copies that plugin's settings (what to count, the extension filter, "show all numbers" and the root folder total), and Settings → Import from File Explorer Note Count does it again at any time. Turn the old plugin off, or each folder will show two numbers.

How it works

The whole vault is counted in one pass over Obsidian's file tree (no file is opened or read, except in words mode), then each folder's number is placed in the explorer. Changes are collected for a moment and counted once, so a sync that brings in a thousand files costs one recount, not a thousand.

Styling

Each number is a .folder-counts-badge element inside the folder's title. Folders that have subfolders also carry .has-subfolders. A CSS snippet can restyle them, for example:

.folder-counts-badge { color: var(--text-accent); }

Installation

In Obsidian, open Settings → Community plugins → Browse and search for "Folder Counts".

More plugins by Siulved54

PluginWhat it doesSource
Shared BlocksWrite a block of text once and reuse it in any note. Edit the source and every reference re-renders live.shared-blocks
Text Case and CleanupChange case, make camelCase or slugs, sort lines and remove duplicates, and repair text pasted out of a PDF, without touching code or URLs.text-format
Typography as You TypeCurly quotes, dashes and ellipses as you type, kept out of code and maths, with Backspace to take one back.smart-typography-plugin
Section NumberingNumber headings as an outline (1, 1.1, 1.2) and keep every link to them working when they renumber.section-numbering
Spreadsheet to TablePaste cells from Excel or Google Sheets as a Markdown table with a real header, insert CSV files, and copy tables back out.spreadsheet-to-table
Hybrid Line NumbersRelative and hybrid line numbers for Vim-style jumps, where a folded section counts as one line.hybrid-line-numbers
List Item CalloutsColour a single list item as a callout by starting it with a character such as &, ! or ?.list-item-callouts
Note Reading TimeReading time of the current note or your selection in the status bar, optionally saved to a property.note-reading-time
Task RolloverRoll unfinished tasks from your last daily note into today's when it is created, with a real undo.task-rollover
Zoom Into SectionZoom into a heading or list item to see only it and its contents, with a breadcrumb bar to climb back out.zoom-into-section
Link Title on PastePaste a web address and get a Markdown link with the page's title, fetched in the background and undone in one step.link-title-on-paste
Update RadarChecks your installed community plugins for updates in the background, shows what changed, and flags the ones that look abandoned.community-update-checker
Dataview to BasesConvert Dataview queries into Bases blocks, and see which queries in your vault can be converted.dataview-to-bases
Line Editing CommandsDuplicate, join, sort and reverse lines, insert blank lines and jump to a line number, with multi-cursor support.line-editing-commands
Note Mover RulesMove notes into folders by ordered rules on tags, properties, titles and paths, with a preview before any bulk move.note-mover-rules
Tab HistoryKeeps each tab's back and forward history across restarts, and adds commands to move, maximize and close tabs.tab-history
URL CardsShows web addresses as cards with title, description and image, and reads existing cardlink blocks.url-cards
Vim ConfigLoads a vimrc-style file from your vault so your key mappings and editor commands are ready when vim mode starts.vim-config
Task ArchiveMoves completed tasks, with their sub-items, into an archive section or note.task-archive
Revisit LaterLink the current note into a future daily note, with a date typed in plain English, so it comes back when you want to review it.revisit-later
Explorer Colors PlusColor files and folders in the file explorer, with a palette, cascading to children, and import from File Color.explorer-colors-plus
Book LookupCreate book notes from Open Library or Google Books, with cover images, ISBN search and Book Search compatible templates.book-lookup
Web Search MenuSearch the web for selected text or the note title from the right-click menu, with engines you define.web-search-menu

All of them are in the community directory: Settings -> Community plugins -> Browse, then search for the name.

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.